package com.java.dp.command;

/**
 * @Author lizhilong
 * @create 2019/12/6 14:25
 * @desc
 */
public class CommandClient {

    public static void main(String[] args) {

        System.out.println("----------------国防部下命令生产枪支-------------");
        Command gunCommand = new GunCommand();
        System.out.println("----------------兵工厂经理收到命令---------------");
        CommandReceiver receiver = new CommandReceiver(gunCommand);
        System.out.println("----------------经理下达生产命令---------------");
        receiver.call();

        System.out.println("\n");

        System.out.println("----------------国防部下命令生产弹药-------------");
        Command bulletsCommand = new BulletsCommand();
        System.out.println("----------------兵工厂经理收到命令---------------");
        CommandReceiver receiver2 = new CommandReceiver(bulletsCommand);
        System.out.println("----------------经理下达生产命令---------------");
        receiver2.call();

    }
}
